<%@ Page Language="C#" AutoEventWireup="true" CodeFile="bugs.aspx.cs" Inherits="bugs" %>

<!--
Copyright 2002-2011 Corey Trager
Distributed under the terms of the GNU General Public License
-->
<!-- #include file = "inc.aspx" -->
<html>
<head>
    <title id="titl" runat="server">btnet bugs</title>
    <link rel="StyleSheet" href="btnet.css" type="text/css" />
    <script type="text/javascript" language="JavaScript" src="jquery/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" language="JavaScript" src="bug_list.js"></script>
    <script language="javascript" type="text/javascript">

        $(document).ready(function () {
            $('.filter').click(on_invert_filter)
            $('.filter_selected').click(on_invert_filter)
        })


        function on_query_changed() {
            var frm = document.getElementById(asp_form_id);
            frm.actn.value = "query";
            frm.submit();
        }

    </script>
</head>
<body>
    <% security.write_menu(Response, Util.get_setting("PluralBugLabel", "bugs")); %>
    <form method="POST" runat="server">
    <div class="align">
        <table border="0">
            <tr>
                <td nowrap="nowrap">
                    <% if (!security.user.adds_not_allowed)
                       { %>
                    <a href="edit_bug.aspx">
                        <img src="add.png" border="0" align="top" alt="" />&nbsp;add new
                        <asp:Label ID="singular_bug_label" runat="server"></asp:Label>
                    </a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <% } %>
                </td>
                <td nowrap="nowrap">
                    <asp:DropDownList ID="query" runat="server" onchange="on_query_changed()">
                    </asp:DropDownList>
                </td>
                <td nowrap="nowrap">
                    &nbsp;&nbsp;&nbsp;&nbsp;<a target="_blank" href="print_bugs.aspx">print list</a>
                </td>
                <td nowrap="nowrap">
                    &nbsp;&nbsp;&nbsp;&nbsp;<a target="_blank" href="print_bugs2.aspx">print detail</a>
                </td>
                <td nowrap="nowrap">
                    &nbsp;&nbsp;&nbsp;&nbsp;<a target="_blank" href="print_bugs.aspx?format=excel">export
                        to excel</a>
                </td>
                <td nowrap="nowrap" align="right" width="100%">
                    <a target="_blank" href="btnet_screen_capture.exe">
                        <img src="camera.png" border="0" align="top" alt="" />
                        &nbsp;download screen capture utility </a>
                </td>
            </tr>
        </table>
        <br />
        <%
            if (this.dv != null)
            {
                if (dv.Table.Rows.Count > 0)
                {
                    if (btnet.Util.get_setting("EnableTags", "0") == "1")
                    {
                        btnet.BugList.display_buglist_tags_line(Response, security);
                    }
                    display_bugs(false);
                }
                else
                {
                    Response.Write("<p>No ");%>
        <asp:Label ID="plural_bug_label" runat="server"></asp:Label>
        
        <%
            Response.Write(" yet.</p>");
                }
            }
            else
            {
                Response.Write("<div class=err>Error in query SQL: " + sql_error + "</div>");
            }
        %>
        <!-- #include file = "inc_bugs2.inc" -->
    </div>
    </form>
    <asp:Literal ID="custom_footer_label" runat="server"></asp:Literal>
</body>
</html>
